#ifndef __DRIVER_H
#define __DRIVER_H

#include "stm32f4xx.h"

#define GENERAL_OCPWM_PIN             GPIO_Pin_0              
#define GENERAL_OCPWM_GPIO_PORT       GPIOB                      
#define GENERAL_OCPWM_GPIO_CLK        RCC_AHB1Periph_GPIOB
#define GENERAL_OCPWM_PINSOURCE				GPIO_PinSource0
#define GENERAL_OCPWM_AF							GPIO_AF_TIM3

#define GENERAL_TIM           		    TIM3
#define GENERAL_TIM_CLK       		    RCC_APB1Periph_TIM3

#define GENERAL_TIM_IRQn					    TIM3_IRQn
#define GENERAL_TIM_IRQHandler        TIM3_IRQHandler
void driver_gpio_on(void);
void driver_gpio_off(void);
void driver_Init(void);
void SetPwm_1(int pwm);
void SetPwm_2(int pwm);


void Xianfu_Pwm(void);
int myabs(int a);

#endif